<?php

namespace app\model;

class AdminGroup extends Common
{
    private static $obj = null;

    public $db_name = 'admin_group';

    public function _initialize()
    {
        parent::_initialize();
    }

    /**
     * 类入口
     * @return AdminGroup|null
     */
    public static function getInstance()
    {
        if (is_null(self::$obj))
            self::$obj = new self();
        return self::$obj;
    }

    /**
     *
     * 获取权限内容
     * @param $int_account_id
     * @return string
     */
    public function getContent($int_admin_id)
    {
        $int_group_id = (int)AdminInfo::getInstance()->toValue(['id' => $int_admin_id], 'group_id');
        if (!($int_group_id > 0)) return '';
        return (string)$this->toValue(['id' => $int_group_id], 'content');
    }
}
